import csv


#写入数据
def write_csv(filename, data, delimiter=';'):
    with open(filename, 'w', newline='', encoding='utf-8') as file:
        csv.writer(file, delimiter=delimiter).writerows(data)

#组装数据
def open_driver(**kwargs):
    if kwargs['driver'] is None:
        write_csv(kwargs.get("filename"), kwargs.get("data"))
        print(kwargs.get("filename"))


